import Vue from 'vue'
import VueRouter from 'vue-router'
import welcome from '../components/welcome.vue'
import personalNcr from '../components/quality/zb/personalNcr.vue'
import hr from '../components/manpower/hr.vue'
import officesupplies from '../components/manpower/officesupplies.vue'
import changeposts from '../components/manpower/changeposts.vue'
import dimission from '../components/manpower/dimission.vue'
import recipients from '../components/manpower/recipients.vue'
import addressbook from '../components/manpower/addressbook.vue'

import bookkeeping from '../components/inventory/bookkeeping.vue'
import product from '../components/inventory/in/product.vue'
import purchase from '../components/inventory/in/purchase.vue'
import inspection from '../components/inventory/in/inspection.vue'
import outwarehouse from '../components/inventory/out/outwarehouse.vue'
import addoutwarehouse from '../components/inventory/out/addoutwarehouse.vue'
import borrow from '../components/inventory/out/borrow.vue'
import addborrow from '../components/inventory/out/addborrow.vue'
import scrap from '../components/inventory/out/scrap.vue'
import addscrap from '../components/inventory/out/addscrap.vue'
import emanagement from '../components/companyAssets/equipment/emanagement.vue'
import eapplication from '../components/companyAssets/equipment/eapplication.vue'
import equery from '../components/companyAssets/equipment/equery.vue'
import incomingShare from '../components/quality/zq/incomingShare.vue'
import workorderAdd from '../components/production/workorderAdd.vue'
import workorderSelect from '../components/production/workorderSelect.vue'
import measurAdd from '../components/production/jlqjtzxz/measurAdd.vue'

import supplierpage from "@/components/procurement/supplier/supplierpage";
import materialpage from "@/components/procurement/material/materialpage";
import returngoodspage from "@/components/procurement/returngoods/returngoodspage";
import purchasepage from "@/components/procurement/purchase/purchasepage";

Vue.use(VueRouter)

const routes = [
  {
    // path: '/index.html', //这个表示的是根目录，即一进入的页面
    // redirect: "backstage/welcome", //设置页面一进来就显示的页面，即重定向到index组件，这里写的内容是对应组将的component的值
    path: "/",
    // component:returngoodspage
    component: purchasepage
    //component:supplierpage
  },
  
  {
    path: '/backstage/welcome',
    name: 'welcome',
    component: welcome
  }, {
    path: '/quality/zb/ncr',
    name: 'personalNcr',
    component: personalNcr
  }, {
    path: '/manpower/hr',
    name: 'hr',
    component: hr
  }, {
    path: '/manpower/officesupplies',
    name: 'officesupplies',
    component: officesupplies
  }, {
    path: '/manpower/changeposts',
    name: 'changeposts',
    component: changeposts
  }, {
    path: '/manpower/dimission',
    name: 'dimission',
    component: dimission
  }, {
    path: '/manpower/recipients',
    name: 'recipients',
    component: recipients
  }, {
    path: '/manpower/addressbook',
    name: 'addressbook',
    component: addressbook
  }, {
    path: '/inventory/bookkeeping',
    name: 'bookkeeping',
    component: bookkeeping
  }, {
    path: '/inventory/product',
    name: 'product',
    component: product
  }, {
    path: '/inventory/purchase',
    name: 'purchase',
    component: purchase
  }, {
    path: '/inventory/inspection',
    name: 'inspection',
    component: inspection
  }, {
    path: '/inventory/outwarehouse/select',
    name: 'outwarehouse',
    component: outwarehouse
  }, {
    path: '/inventory/outwarehouse/add',
    name: 'addoutwarehouse',
    component: addoutwarehouse
  }, {
    path: '/inventory/borrow/select',
    name: 'borrow',
    component: borrow
  }, {
    path: '/inventory/borrow/add',
    name: 'addborrow',
    component: addborrow
  }, {
    path: '/inventory/scrap/select',
    name: 'scrap',
    component: scrap
  }, {
    path: '/inventory/scrap/add',
    name: 'addscrap',
    component: addscrap
  }, {
    path: '/equipment/list',
    name: 'emanagement',
    component: emanagement
  }, {
    path: '/equipment/select',
    name: 'equery',
    component: equery
  }, {
    path: '/equipment/apply',
    name: 'eapplication',
    component: eapplication
  }, {
    path: '/quality/zq/inspection/dis',
    name: 'incomingShare',
    component: incomingShare
  }, {
    path: "/procurement/supplier",//供应商
    component: supplierpage
  }, {
    path: "/procurement/material",//物料
    component: materialpage
  }, {
    path: "/procurement/returngoods",//退货
    component: returngoodspage
  }, {
    path: "/procurement/purchase", //采购
    component: purchasepage
  },{
    path: '/production/gdxz',
    name: 'workorderAdd',
    component: workorderAdd
  },
  {
    path: '/production/gdcx',
    name: 'workorderSelect',
    component: workorderSelect
  },
   {
    path: '/production/jlqjtzxz/zj',
    name: 'measurAdd',
    component: measurAdd
  }

]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
